Investigating the use of analysis contracts to improve the testability of object-oriented code
نویسندگان
چکیده
A number of activities involved in testing software are known to be difficult and time consuming. Among them is the definition and coding of test oracles and the isolation of faults once failures have been detected. Through a thorough and rigorous empirical study, we investigate how the instrumentation of contracts could address both issues. Contracts are known to be a useful technique to specify the precondition and postcondition of operations and class invariants, thus making the definition of objectoriented analysis or design elements more precise. It is one of the reasons the Object Constraint Language (OCL) was made part of UML. Our aim in this paper is to reuse and instrument contracts to ease testing. A thorough case study is run where we define OCL contracts, instrument them using a commercial tool, and assess the benefits and limitations of doing so to support the automated detection of failures and the isolation of faults. As contracts can be defined at various levels of details, we also investigate the cost and benefit of using contracts at different levels of precision. We then draw practical conclusions regarding the applicability of the approach and its limitations.
منابع مشابه
On Attributes of Objects in Object-Oriented Software Analysis
One of the modern paradigms to develop a system is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles. There is a sequence of activities to develop an analysis model. In the first step, we work in developing an initial use case model. Then in the second step, they identify a number of concepts and build a glossary of partic...
متن کاملModelsaz: An Object-Oriented Computer-Aided Modeling Environment
Modeling and simulation of processing plants are widely used in industry. Construction of a mathematical model for a plant is a time-consuming and error-prone task. In light of extensive advancements in computer science (both hardware and software), computers are becoming a necessary instrument in industrial activities. Many software tools for modeling, simulation and optimization of proces...
متن کاملObjects Identification in Object-Oriented Software Development - A Taxonomy and Survey on Techniques
Analysis and design of object oriented is onemodern paradigms for developing a system. In this paradigm, there are several objects and each object plays some specific roles. Identifying objects (and classes) is one of the most important steps in the object-oriented paradigm. This paper makes a literature review over techniques to identify objects and then presents six taxonomies for them. The f...
متن کاملApplication of Artificial Neural Networks for Assessing the Testability of Object Oriented Software
In this paper, we present the application of neural networks for predicting the software testability using the object oriented design metrics. The testability is generally measured in terms of the effort required for testing. The object oriented design metrics are used as the independent variables and two JUnit based test metrics are used as dependent variables in this study. The software metri...
متن کاملChange Detection Gamasiab River Margins in Kermanshah by Comparison Pixel Base and Object Orientd Algorithms
Introduction Land use reflects the interactive characteristics of humans and the environment and describes how human exploitation works for one or more targets on the ground. Land use is usually defined on the basis of human use of the land, with an emphasis on the functional role of land in economic activities. Land use, which is associated with human activity, is undergoing change over time....
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Softw., Pract. Exper.
دوره 33 شماره
صفحات -
تاریخ انتشار 2003